package day7;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;

public class demo1 {
    public static void main(String[] args) throws IOException {
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        char[]str= reader.readLine().toCharArray();
        int begin=-1,n=str.length,len=0;
        for (int i = 0; i <n ; i++) {
            if(str[i]>='0'&&str[i]<='9'){
                int j=i;
                while(j<n&&str[j]>='0'&&str[j]<='9'){
                    j++;
                }
                if(j-i+1>len){
                    len=j-i+1;
                    begin=i;
                }
            }
        }
        for (int i = begin; i <begin+len-1 ; i++) {
            System.out.print(str[i]);
        }
    }
}
